package com.stray.crawl.expr.psr.jsoup;

import org.jsoup.nodes.Element;

import com.stray.crawl.expr.EventData;
import com.stray.crawl.expr.Express;

public class ChildParser extends Express {

	@Override
	protected Object doParse(EventData event) {
		Element e = (Element) event.getObject();
		int[] idxs = event.toIntArrayArgument();

		for (int idx : idxs) {
			e = e.child(idx);
		}

		return e;
	}

}